<template>
  <div>
    <router-view></router-view>
    <FooterGuide v-show="$route.meta.showFooter"/>
  </div>
</template>

<script>
import FooterGuide from "./components/FooterGuide/FooterGuide";
import axios from "axios";
import { reqFoodCategorys } from "./api/index";
import { mapActions } from "vuex";

export default {
  components: { FooterGuide },
  mounted() {
    //this.getAddress();
    this.$store.dispatch("getAddress");
    this.getGoods();
    this.getShops();
    //自动登录,发起ajax请求
    this.reqUserInfo();
  },
  methods: {
    /* 定义 actions 的函数 */
    ...mapActions(["getGoods", "getShops", "reqUserInfo"])
  }
};
</script>

<style lang="scss" scoped>
</style>



